package com.mybatis03;

import com.mybatis03.mapper.DeptMapper01;
import com.mybatis03.mapper.EmpMapper;
import com.mybatis03.mapper.EmpMapper01;
import com.mybatis03.pojo.Dept01;
import com.mybatis03.pojo.Emp;
import com.mybatis03.pojo.Emp01;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
class Mybatis03ApplicationTests01 {
    @Autowired
    private EmpMapper01 empMapper01;
    @Autowired
    private DeptMapper01 deptMapper01;

    @Test
    void contextLoads() {
      /*  List<Emp01> list = empMapper01.getList();
        System.out.println("list = " + list);*/

//        Dept01 deptById = deptMapper01.getDeptById(2);
//        System.out.println("deptById = " + deptById);
        
        

        Emp01 emp01AndDeptById = empMapper01.getEmp01AndDeptById02(1);

        System.out.println("emp01AndDeptById = " + emp01AndDeptById);

    }

}
